<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>AI-F10</title>
    <style>
      html,
      body {
        height: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
        font-family:
          PingFang Medium,
          PingFang SC,
          Source Han Sans !important;
        background-color: #ebeef5;
        overflow-x: hidden;
      }
      .dark body {
        background-color: #2e343a;
      }
    </style>
    <script>
      try {
        const theme = localStorage.getItem('vueuse-color-scheme')
        if (
          theme === 'dark' ||
          (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)
        ) {
          document.documentElement.classList.add('dark')
        } else {
          document.documentElement.classList.remove('dark')
        }
      } catch (_) {}
    </script>
  </head>
  <body class="bg-background-06 black:bg-background-06-dark">
    <div id="app"></div>
    <!-- PC端协议CDN/埋点/方法库 -->
    <script
      crossorigin
      src="//s.thsi.cn/cb?js/common/cefapi/1.5.5/cefApi.min.js;js/basic/stock/newPcJs/common.js;js/home/;ths_core.min.js"
    ></script>
    <script
      crossorigin
      src="//s.thsi.cn/cb?cd/weblog/0.0.1-alpha.29/weblog.js;cd/website-thsc-f10-utils/1.6.3/;thsc-f10-utils.js;js/m/common/;basic.js"
    ></script>
    <script crossorigin src="//s.thsi.cn/hxapp/m/base/js/skywalking.1.1.16.min.js"></script>

    <!-- 可视化组件依赖 -->
    <script crossorigin src="//s.thsi.cn/cb?cd/website-f10-pluto/v3.0/lib/;echarts.min.js"></script>
    <script
      crossorigin
      src="//s.thsi.cn/cd/website-f10-pluto/v3.0/lib/echarts-gl/2.0.9/bundle.umd.min.js"
    ></script>
    <!-- <script crossorigin src="//s.thsi.cn/cd/iwc-datav-standard-chart/1.5.0/bundle.umd.js"></script> -->
    <script
      crossorigin
      src="//s.thsi.cn/cd/website-f10-pluto/v3.2/lib/standard-chart/1.5.x/bundle.umd.min.js"
    ></script>
    <!-- <script src="./lib/standard-chart/1.5.x/bundle.umd.min.js"></script> -->
    <script
      crossorigin
      src="//s.thsi.cn/cd/website-f10-pluto/v3.0/lib/timeline/0.3.1/bundle.umd.min.js"
    ></script>
    <script
      crossorigin
      src="//s.thsi.cn/cd/website-f10-pluto/v3.2/lib/aigc-data-vis/20240708/bundle.umd.min.js"
    ></script>
    <!-- <script src="./lib/aigc-data-vis/20240708/bundle.umd.min.js"></script> -->

    <!-- 布局框架 -->
    <script crossorigin src="//s.thsi.cn/cd/website-f10-pluto/v3.0/lib/muuri.min.js"></script>

    <!-- 拖拽tab库 -->
    <script crossorigin src="//s.thsi.cn/cd/website-f10-pluto/v3.2/lib/sortable.min.js"></script>

    <script>
      // Web端登录
      var loginIssue = {
        isLogin: function () {
          var uname = unescape(unescape(THS.cookie.get('escapename')))
          if (uname.length > 0) {
            return true
          } else {
            return false
          }
        },
        getUser: function () {
          var user = new Array()
          var uname = unescape(unescape(THS.cookie.get('escapename')))
          if (uname.length > 0) {
            user['uname'] = uname
          }
          var userid = unescape(unescape(THS.cookie.get('userid')))
          if (userid.length > 0) {
            user['userid'] = userid
            user['avatar'] =
              'http://space.10jqka.com.cn/avatar/' +
              (parseInt(userid) % 10000) +
              '/' +
              userid +
              '.gif'
          }
          return user
        },
        getInfo: function () {
          if (loginIssue.isLogin()) {
            var user = loginIssue.getUser()
            var uname = user['uname']
            $('#J_username').html(uname)
            $('.login-box').addClass('hide')
            $('.logined_box').removeClass('hide')
          } else {
            $('.login-box').removeClass('hide')
            $('.logined_box').addClass('hide')
          }
          loginIssue.logOut()
        },
        logOut: function (url) {
          if (location.host.indexOf('10jqka.com.cn') > -1) {
            window.location.href = 'https://upass.10jqka.com.cn/logout?redir=' + url
          } else {
            window.location.href =
              'https://upass.10jqka.com.cn/logout?redir=' +
              encodeURIComponent(
                'https://' + 'upass.300033.info/logout?redir=' + encodeURIComponent(url)
              )
          }
        }
      }
      // window.weblog = {
      //   report: function () {},
      //   setConfig: function () {}
      // }
      // 埋点注册
      window.weblog.setConfig({
        appKey: 'a85ac98cdf',
        debug: true
      })
      console.log('html resource load time：', window.performance.now())

      // 正式环境关闭日志
      const isDev = F10Utils.getUrlParams('dev')
      if (!isDev) {
        window.console.log = function () {}
      }

      // 监控注册
      try {
        ClientMonitor.register({
          collector: 'https://apm.hexin.cn/skywalking-web',
          rate: 0.6,
          service: 'f10::aif10',
          serviceVersion: 'aif10_v3.1',
          enableSPA: false,
          useFmp: true,
          noTrace: true,
          noErrorPaths: ['cbasspider.10jqka.com.cn:8443'],
          perfEntries: true
        })
        window.f10log = function (category, content, err) {
          console.error(category, content, err)
          ClientMonitor.reportFrameErrors(
            {
              category,
              content
            },
            err
          )
        }
      } catch (e) {
        console.warn('监控注册失败！', e.message)
      }
    </script>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>
